<?php

/* Make sure table exist in database */

if ($tableName != "" && /*$tableName != "users" &&*/ $tableName !="access_levels") {
// Solution from http://stackoverflow.com/questions/1525784/mysql-check-if-a-table-exists-without-throwing-an-exception
	$result = mysql_query("SHOW TABLES LIKE '".$tableName."'");
	$tableExists = mysql_num_rows($result) > 0;
	if (!$tableExists) {
        	echo "<p>The table you have requested (\"" . $_GET["data"] . "\") does not exist.</p>";
	}
} else {
	$tableExits = 0;
}

?>
